package request

type SysMenuAddRequest struct {
	ParentId  uint   `json:"parent_id" binding:"gte=0" label:"父级ID"`
	Name      string `json:"name" binding:"required" label:"菜单名称"`
	Path      string `json:"path" label:"路由地址"`
	ApiPath   string `json:"api_path" label:"接口地址"`
	Component string `json:"component" label:"组件路径"`
	Icon      string `json:"icon" label:"图标"`
	Sort      int    `json:"sort" default:"0" label:"排序"`

	Type    int    `json:"type" binding:"oneof=1 2 3 4" label:"类型"`
	Perms   string `json:"perms" label:"按钮权限标识"`
	Remark  string `json:"remark" label:"备注"`
	IsFrame bool   `json:"is_frame" label:"是否外链"`
}

type SysMenuUpdateRequest struct {
	ParentId  uint   `json:"parent_id" binding:"gte=0" label:"父级ID"`
	Name      string `json:"name" binding:"required" label:"菜单名称"`
	Path      string `json:"path" label:"路由地址"`
	ApiPath   string `json:"api_path" label:"接口地址"`
	Component string `json:"component" label:"组件路径"`
	Icon      string `json:"icon" label:"图标"`
	Sort      int    `json:"sort" binding:"gte=0" label:"排序"`
	Status    int    `json:"status" binding:"oneof=0 1" label:"状态"`
	Hidden    int    `json:"hidden" binding:"oneof=0 1" label:"是否隐藏"`
	Type      int    `json:"type" binding:"oneof=1 2 3" label:"类型"`
	Perms     string `json:"perms" label:"按钮权限标识"`
	Visible   int    `json:"visible" binding:"oneof=0 1" label:"是否可见"`
	Remark    string `json:"remark" label:"备注"`
	IsFrame   bool   `json:"is_frame" label:"是否外链"`
}

type SysMenuListRequest struct {
	Name     string `form:"name"`      // 菜单名称
	Path     string `form:"path"`      // 路由路径
	Status   *int   `form:"status"`    // 状态
	ParentId *uint  `form:"parent_id"` // 父级ID
	PageInfo
}

type SysMenuAssignRequest struct {
	RoleId  uint   `json:"role_id" binding:"required" label:"角色ID"`
	MenuIds []uint `json:"menu_ids" binding:"required" label:"菜单ID列表"`
}
